#include<stdio.h>
#include<stdlib.h>

int main() {
    printf("my message is %s\n", "hello world!");
    fprintf(stdout,"my message is %s\n", "hello world!\n");
    char buff[100]={0};
    sprintf(buff, "my message is %s, num is %d\n", "hello world!", 100);
    printf("%s\n", buff);

    char buff2[5]={0};
    snprintf(buff2, sizeof(buff2),"mymessage is %s, num is %d\n", "hello world!", 100);
    buff2[4]='\0';
    printf("%s\n", buff2);
    return 0;
}